package com.sys.service;

import com.sys.entity.SysCrontab;
import com.bhudy.base.BaseService;
import org.quartz.SchedulerException;

import java.io.Serializable;
import java.util.Date;

/**
 * @Author bhudy
 * @Description SysCrontabService
 * @Date Mon Nov 04 14:28:07 CST 2019
 */
public interface SysCrontabService extends BaseService<SysCrontab, Serializable> {

    void startQuartzJobAll();

    void createCrontabJob(SysCrontab sysCrontab) throws Exception;

    void addQuartzJob(String jobName, Class jobClass, Date startTime, Long sysCrontabId) throws SchedulerException;

    void addQuartzJob(String jobName, Class jobClass, String time, Long sysCrontabId) throws SchedulerException;

    void removeQuartzJob(Long sysCrontabId) throws SchedulerException;

    void modifyQuartzJobTime(Long crontabId) throws Exception;

}
